﻿@{
    ViewBag.Title = "修改";
    Layout = "../Shared/_Layout.cshtml";
}
@using mscook.mvc;
@model mscook.mvc.Areas.weblogin.Models.LoginUserOfPresentModel

@section JavaScript
{
    <script type="text/javascript" src="@Url.Content("~/scripts/jquery.validate.js")"></script>
    <script type="text/javascript" src="@Url.Content("~/scripts/jquery.validate.unobtrusive.js")"></script>
    <script type="text/javascript" src="@Url.Content("~/scripts/jquery.unobtrusive-ajax.js")"></script>
}
<div class="row-fluid sortable">
    <div class="box span12">
        <div class="box-header well">
            <h2><i class="icon-edit"></i></h2>

        </div>
        <div class="box-content">
            @using (Html.BeginForm("Edit", "LoginUserOfPresent", FormMethod.Post, new { enctype = "multipart/form-data", @class = "form-horizontal" }))
            {
                <fieldset>
                    <legend>兑换积分申请受理</legend>
                    <input type="hidden" name="Id" value="@Model.LoginUserOfPresent.Id" />
                    <div class="control-group">
                        <label class="control-label">是否受理</label>
                        <div class="controls">
                            <div class="input-prepend">
                                @{
                var itemList = new List<SelectListItem>();
                itemList.Add(new SelectListItem() { Text = "否", Value = "false", Selected = false });
                itemList.Add(new SelectListItem() { Text = "是", Value = "true", Selected = false });
            
                                    @Html.DropDownListFor(model => model.IsPassed, itemList);
                                       
                                }
                            </div>
                            @Html.ValidationMessageFor(model => model.IsPassed)
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">申请人</label>
                        <div class="controls">
                            <div class="input-prepend">
                                <input type="text" readonly="true" value="@Html.Encode(Model.LoginUserOfPresent.LoginUser.LoginName)" />
                            </div>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">申请数量</label>
                        <div class="controls">
                            <div class="input-prepend">
                                <input type="text" readonly="true" value="@Html.Encode(Model.LoginUserOfPresent.Amount)" />
                            </div>
                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label">联系人地址</label>
                        <div class="controls">
                            <div class="input-prepend">
                                <input type="text" readonly="true" value="@Html.Encode(Model.LoginUserOfPresent.Address)" />
                            </div>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">联系人电话</label>
                        <div class="controls">
                            <div class="input-prepend">
                                <input type="text" readonly="true" value="@Html.Encode(Model.LoginUserOfPresent.Tel)" />
                            </div>
                        </div>
                    </div>


                    <div class="control-group">
                        <label class="control-label">礼品名称</label>
                        <div class="controls">
                            <div class="input-prepend">
                                @Html.TextBoxFor(loginUserOfVipModel => loginUserOfVipModel.LoginUserOfPresent.Present.Name, new { @readonly = "true", size = "16" })
                            </div>
                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label">礼品图片</label>
                        <div class="controls">
                            <div class="input-prepend" style="width: 400px">
                                <!--<img src="~/Upload/default/@Model.LoginUserOfPresent.Present.ImageName"/>-->
                                @if (string.IsNullOrEmpty(Model.LoginUserOfPresent.Present.ImageName))
                                {
                                    <img id="preview" style="display: none; width: 100%" />
                                }
                                else
                                {
                                    <img id="preview"  style="width:100%" src="~/Upload/@Model.LoginUserOfPresent.Present.ImageName"  />
                                }
                            </div>
                        </div>
                    </div>



                    <div class="form-actions">
                        <button type="submit" class="btn btn-primary btn-large">保存</button>
                        <button class="btn btn-large">Cancel</button>
                    </div>
                </fieldset>
            }
        </div>
    </div>
    <!--/span-->

</div>
